//
//  LWKFont.swift
//  ljy_demo
//
//  Created by xiandao on 2025/9/4.
//

import UIKit

protocol LWKFont {
    /// 字体大小
    func lwkA1Font() -> UIFont
    func lwkA2Font() -> UIFont
    func lwkA3Font() -> UIFont
    func lwkA4Font() -> UIFont
    func lwkA5Font() -> UIFont
    func lwkA6Font() -> UIFont
    func lwkA7Font() -> UIFont
    func lwkA8Font() -> UIFont
    func lwkA9Font() -> UIFont
    func lwkA10Font() -> UIFont
    func lwkA11Font() -> UIFont
    func lwkA12Font() -> UIFont
    func lwkA13Font() -> UIFont
    func lwkA14Font() -> UIFont
    func lwkA15Font() -> UIFont
    func lwkA16Font() -> UIFont
    func lwkA17Font() -> UIFont
    func lwkA18Font() -> UIFont
    func lwkA19Font() -> UIFont
    func lwkA20Font() -> UIFont
    func lwkA21Font() -> UIFont
    func lwkA22Font() -> UIFont
    func lwkA23Font() -> UIFont
    func lwkA24Font() -> UIFont
    func lwkA25Font() -> UIFont
    func lwkA26Font() -> UIFont
    func lwkA27Font() -> UIFont
    func lwkA28Font() -> UIFont
    func lwkA29Font() -> UIFont
    func lwkA30Font() -> UIFont
    func lwkA31Font() -> UIFont
    func lwkA32Font() -> UIFont
    func lwkA33Font() -> UIFont
    func lwkA34Font() -> UIFont
    func lwkA35Font() -> UIFont
    
    func lwkB1Font() -> UIFont
    func lwkB2Font() -> UIFont
    func lwkB3Font() -> UIFont
    func lwkB4Font() -> UIFont
    func lwkB5Font() -> UIFont
    func lwkB6Font() -> UIFont
    func lwkB7Font() -> UIFont
    
    func lwkC1Font() -> UIFont
    func lwkC2Font() -> UIFont
    func lwkC3Font() -> UIFont
    func lwkC4Font() -> UIFont
    
    func lwkFontRegular(size: CGFloat) -> UIFont
    func lwkFontMedium(size: CGFloat) -> UIFont
    func lwkFontHeavy(size: CGFloat) -> UIFont
    func lwkFontBold(size: CGFloat) -> UIFont
   
    func lwkFontColor() -> UIColor
    
    /// 字体颜色
    func lwkA1FontColor() -> UIColor
    func lwkA2FontColor() -> UIColor
    func lwkA3FontColor() -> UIColor
    func lwkA4FontColor() -> UIColor
    func lwkA5FontColor() -> UIColor
    func lwkA6FontColor() -> UIColor
    func lwkA7FontColor() -> UIColor
    func lwkA8FontColor() -> UIColor
    func lwkA9FontColor() -> UIColor
    func lwkA10FontColor() -> UIColor
    func lwkA11FontColor() -> UIColor
    func lwkA12FontColor() -> UIColor
    func lwkA13FontColor() -> UIColor
    func lwkA14FontColor() -> UIColor
    func lwkA15FontColor() -> UIColor
    func lwkA16FontColor() -> UIColor
    func lwkA17FontColor() -> UIColor
    func lwkA18FontColor() -> UIColor
    func lwkA19FontColor() -> UIColor
    func lwkA20FontColor() -> UIColor
    func lwkA21FontColor() -> UIColor
    func lwkA22FontColor() -> UIColor
    func lwkA23FontColor() -> UIColor
    func lwkA24FontColor() -> UIColor
    func lwkA25FontColor() -> UIColor
    func lwkA26FontColor() -> UIColor
    func lwkA27FontColor() -> UIColor
    func lwkA28FontColor() -> UIColor
    func lwkA29FontColor() -> UIColor
    func lwkA30FontColor() -> UIColor
    func lwkA31FontColor() -> UIColor
    func lwkA32FontColor() -> UIColor
    func lwkA33FontColor() -> UIColor
    func lwkA34FontColor() -> UIColor
    func lwkA35FontColor() -> UIColor
    
    func lwkLoginTfFontColor() -> UIColor
       
    func lwkGreenColor() -> UIColor
    
    func lwkB1FontColor() -> UIColor
    func lwkB2FontColor() -> UIColor
    func lwkB3FontColor() -> UIColor
    func lwkB4FontColor() -> UIColor
    func lwkB5FontColor() -> UIColor
    func lwkB6FontColor() -> UIColor
    func lwkB7FontColor() -> UIColor
    
    func lwkC1FontColor() -> UIColor
    func lwkC2FontColor() -> UIColor
    func lwkC3FontColor() -> UIColor
    func lwkC4FontColor() -> UIColor
}

extension LWKFont {
    
    //标准字体
    func lwkA1Font() -> UIFont {
        return UIFont.systemFont(ofSize: 28, weight: .bold)
    }
    
    func lwkA2Font() -> UIFont {
        return UIFont.systemFont(ofSize: 24, weight: .bold)
    }
    
    func lwkA3Font() -> UIFont {
        return UIFont.systemFont(ofSize: 18, weight: .bold)
    }
    
    func lwkA4Font() -> UIFont {
        return UIFont.systemFont(ofSize: 17, weight: .bold)
    }
    
    func lwkA5Font() -> UIFont {
        return UIFont.systemFont(ofSize: 17, weight: .bold)
    }
    
    func lwkA6Font() -> UIFont {
        return UIFont.systemFont(ofSize: 17, weight: .regular)
    }
    
    func lwkA7Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .bold)
    }
    
    func lwkA8Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .regular)
    }
    
    func lwkA9Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .bold)
    }
    
    func lwkA10Font() -> UIFont {
        return UIFont.systemFont(ofSize: 14, weight: .bold)
    }
    
    func lwkA11Font() -> UIFont {
        return UIFont.systemFont(ofSize: 14, weight: .bold)
    }
    
    func lwkA12Font() -> UIFont {
        return UIFont.systemFont(ofSize: 12, weight: .regular)
    }
    
    func lwkA13Font() -> UIFont {
        return UIFont.systemFont(ofSize: 12, weight: .regular)
    }
    
    func lwkA14Font() -> UIFont {
        return UIFont.systemFont(ofSize: 14, weight: .regular)
    }
    
    func lwkA15Font() -> UIFont {
        return UIFont.systemFont(ofSize: 14, weight: .bold)
    }
    
    func lwkA16Font() -> UIFont {
        return UIFont.systemFont(ofSize: 12, weight: .regular)
    }
    func lwkA17Font() -> UIFont {
        return UIFont.systemFont(ofSize: 12, weight: .bold)
    }
    func lwkA18Font() -> UIFont {
        return UIFont.systemFont(ofSize: 11, weight: .regular)
    }
    func lwkA19Font() -> UIFont {
        return UIFont.systemFont(ofSize: 14, weight: .regular)
    }
    func lwkA20Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .bold)
    }
    func lwkA21Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .regular)
    }
    func lwkA22Font() -> UIFont {
        return UIFont.systemFont(ofSize: 28, weight: .bold)
    }
    func lwkA23Font() -> UIFont {
        return UIFont.systemFont(ofSize: 18, weight: .bold)
    }
    func lwkA24Font() -> UIFont {
        return UIFont.systemFont(ofSize: 11, weight: .regular)
    }
    func lwkA25Font() -> UIFont {
        return UIFont.systemFont(ofSize: 11, weight: .regular)
    }
    func lwkA26Font() -> UIFont {
        return UIFont.systemFont(ofSize: 17, weight: .bold)
    }
    func lwkA27Font() -> UIFont {
        return UIFont.systemFont(ofSize: 24, weight: .bold)
    }
    func lwkA28Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .bold)
    }
    func lwkA29Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .bold)
    }
    func lwkA30Font() -> UIFont {
        return UIFont.systemFont(ofSize: 11, weight: .regular)
    }
    func lwkA31Font() -> UIFont {
        return UIFont.systemFont(ofSize: 12, weight: .bold)
    }
    func lwkA32Font() -> UIFont {
        return UIFont.systemFont(ofSize: 15, weight: .bold)
    }
    func lwkA33Font() -> UIFont {
        return UIFont.systemFont(ofSize: 14, weight: .bold)
    }
    func lwkA34Font() -> UIFont {
        return UIFont.systemFont(ofSize: 21, weight: .bold)
    }
    func lwkA35Font() -> UIFont {
        return UIFont.systemFont(ofSize: 10, weight: .bold)
    }
    
    // Oswald字体
    func lwkB1Font() -> UIFont {
        if let font = UIFont(name: "Oswald-Medium", size: 54) {
            return font
        }
        return UIFont.systemFont(ofSize: 54, weight: .regular)
    }
    
    func lwkB2Font() -> UIFont {
        if let font = UIFont(name: "Oswald-Medium", size: 28) {
            return font
        }
        return UIFont.systemFont(ofSize: 28, weight: .regular)
    }
    
    func lwkB3Font() -> UIFont {
        if let font = UIFont(name: "Oswald-Medium", size: 21) {
            return font
        }
        return UIFont.systemFont(ofSize: 21, weight: .regular)
    }
    
    func lwkB4Font() -> UIFont {
        if let font = UIFont(name: "Oswald-Medium", size: 14) {
            return font
        }
        return UIFont.systemFont(ofSize: 14, weight: .regular)
    }
    
    func lwkB5Font() -> UIFont {
        if let font = UIFont(name: "Oswald-Medium", size: 24) {
            return font
        }
        return UIFont.systemFont(ofSize: 24, weight: .regular)
    }
    
    func lwkB6Font() -> UIFont {
        if let font = UIFont(name: "Oswald-Medium", size: 18) {
            return font
        }
        return UIFont.systemFont(ofSize: 18, weight: .regular)
    }
    
    func lwkB7Font() -> UIFont {
        if let font = UIFont(name: "Oswald-Medium", size: 12) {
            return font
        }
        return UIFont.systemFont(ofSize: 12, weight: .regular)
    }
    
    // 阿里妈妈字体
    func lwkC1Font() -> UIFont {
        if let font = UIFont(name: "Alimama_ShuHeiTi_Bold", size: 24) {
            return font
        }
        return UIFont.systemFont(ofSize: 24, weight: .bold)
    }
    
    func lwkC2Font() -> UIFont {
        if let font = UIFont(name: "Alimama_ShuHeiTi_Bold", size: 28) {
            return font
        }
        return UIFont.systemFont(ofSize: 28, weight: .bold)
    }
    
    func lwkC3Font() -> UIFont {
        if let font = UIFont(name: "Alimama_ShuHeiTi_Bold", size: 18) {
            return font
        }
        return UIFont.systemFont(ofSize: 18, weight: .bold)
    }
    
    func lwkC4Font() -> UIFont {
        if let font = UIFont(name: "Alimama_ShuHeiTi_Bold", size: 15) {
            return font
        }
        return UIFont.systemFont(ofSize: 15, weight: .bold)
    }
    
    /// 标准字体颜色
    // 一级标题(特殊字号“titleBar标题”)
    func lwkA1FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    // 二级标题(模块标题)
    func lwkA2FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    // 三级标题(功能模块标题“运动概况”)
    func lwkA3FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    // 特殊模块
    func lwkA4FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    // 卡片模块儿名称“今日运动”
    func lwkA5FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    // 首页详情页信息常用字号
    func lwkA6FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    // 特殊模块
    func lwkA7FontColor() -> UIColor {
        return UIColor.init(hex: "#90B2C6", alpha: 0.8)
    }
    // 最小字体，常用标签处等
    func lwkA8FontColor() -> UIColor {
        return UIColor.init(hex: "#1A1A1A", alpha: 0.8)
    }
    // 特殊模块
    func lwkA9FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    // 底部导航选中态
    func lwkA10FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    // 最大字体-运动数据
    func lwkA11FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    
    func lwkA12FontColor() -> UIColor {
        return UIColor.init(hex: "#1A1A1A", alpha: 0.6)
    }
    
    func lwkA13FontColor() -> UIColor {
        return UIColor.init(hex: "#FFFFFF", alpha: 0.6)
    }
    
    func lwkA14FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkA15FontColor() -> UIColor {
        return UIColor.hex(hexString: "#90B2C6")
    }
    
    func lwkA16FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    func lwkA17FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FE5C5C")
    }
    func lwkA18FontColor() -> UIColor {
        return UIColor.hexColor(hex: "#1A1A1A", alpha: 0.8)
    }
    func lwkA19FontColor() -> UIColor {
        return UIColor.hexColor(hex: "#1A1A1A", alpha: 0.6)
    }
    func lwkA20FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    func lwkA21FontColor() -> UIColor {
        return UIColor.hexColor(hex: "#1A1A1A", alpha: 0.2)
    }
    func lwkA22FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    func lwkA23FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    func lwkA24FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    func lwkA25FontColor() -> UIColor {
        return UIColor.hexColor(hex: "#1A1A1A", alpha: 0.4)
    }
    func lwkA26FontColor() -> UIColor {
        return UIColor.hex(hexString: "#90B2C6")
    }
    func lwkA27FontColor() -> UIColor {
        return UIColor.hex(hexString: "#90B2C6")
    }
    func lwkA28FontColor() -> UIColor {
        return UIColor.hex(hexString: "#70C670")
    }
    func lwkA29FontColor() -> UIColor {
        return UIColor.hex(hexString: "#F7EAD8")
    }
    func lwkA30FontColor() -> UIColor {
        return UIColor.hexColor(hex: "#FFFFFF", alpha: 0.6)
    }
    func lwkA31FontColor() -> UIColor {
        return UIColor.hex(hexString: "#90B2C6")
    }
    func lwkA32FontColor() -> UIColor {
        return UIColor.hex(hexString: "#DB4E4E")
    }
    func lwkA33FontColor() -> UIColor {
        return UIColor.hex(hexString: "#6184F4")
    }
    func lwkA34FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    func lwkA35FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    
    // Oswald字体颜色
    func lwkB1FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkB2FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkB3FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkB4FontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    
    func lwkB5FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkB6FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkB7FontColor() -> UIColor {
        return UIColor.hexColor(hex: "#FFFFFF", alpha: 0.6)
    }
    
    // 阿里妈妈字体颜色
    func lwkC1FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkC2FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkC3FontColor() -> UIColor {
        return UIColor.hex(hexString: "#90B2C6")
    }
    
    func lwkC4FontColor() -> UIColor {
        return UIColor.hex(hexString: "#1A1A1A")
    }
    
    func lwkLoginTfFontColor() -> UIColor {
        return UIColor.hexColor(hex: "#FFFFFF", alpha: 0.3)
    }
    
    func lwkFontRegular(size : CGFloat) -> UIFont {
        if let font = UIFont(name: "Alibaba-PuHuiTi-Regular", size: size) {
            return font
        }
        return UIFont.systemFont(ofSize: size, weight: .regular)
    }

    func lwkFontMedium(size : CGFloat) -> UIFont {
        if let font = UIFont(name: "Alibaba-PuHuiTi-Medium", size: size) {
            return font
        }
        return UIFont.systemFont(ofSize: size, weight: .medium)
    }

    func lwkFontHeavy(size : CGFloat) -> UIFont {
        if let font = UIFont(name: "Alibaba-PuHuiTi-H", size: size) {
            return font
        }
        return UIFont.systemFont(ofSize: size, weight: .heavy)
    }
    
    func lwkFontBold(size : CGFloat) -> UIFont {
        if let font = UIFont(name: "Alibaba-PuHuiTi-B", size: size) {
            return font
        }
        return UIFont.systemFont(ofSize: size, weight: .heavy)
    }
    
    func lwkFontColor() -> UIColor {
        return UIColor.hex(hexString: "#FFFFFF")
    }
    
    func lwkGreenColor() -> UIColor {
        return UIColor.hex(hexString: "#33FF99")
    }
}

